/* 
 * File:   Road.cpp
 * Author: mikey
 * 
 * Created on August 25, 2010, 10:03 PM
 */

#include "Road.h"

Road::Road() {
    numLanes = 2;
    carLane[0] = Lane();
    carLane[1] = Lane();
    roadProbability = 0.5;
}

Road::Road(int newNumLanes) {
    numLanes = newNumLanes;
    roadProbability = 0.5;
    for (int i=0;i<=newNumLanes;i++) {
        carLane[i] = Lane();
    }
}

void Road::setRoadProbability(float roadProbability) {
    this->roadProbability = roadProbability;
}

float Road::getRoadProbability() {
    return roadProbability;
}

Lane Road::getLane(int laneNum) {
    return carLane[laneNum];
}

int Road::getNumLanes() {
    return numLanes;
}

